@page {
    size: A4;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background: url('/bg.jpg') no-repeat center center fixed;
    background-size: cover;
}

.report {
    background: rgba(255, 255, 255, 0.9);
    margin: 2cm auto;
    padding: 2cm;
    width: 18cm;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    margin-bottom: 1cm;
}

h2 {
    margin-top: 1cm;
    border-bottom: 2px solid #333;
    padding-bottom: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    border: 1px solid #ccc;
    padding: 6px;
    text-align: center;
}

thead {
    background: #f5f5f5;
}

@media print {

    /* body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('/bg.jpg') no-repeat center center;
        background-size: cover;
        opacity: 0.1;
        z-index: -1;
    } */

    /* 防止长表格行跨页时内容被截断 */
    table {
        width: 100%;
        border-collapse: collapse;
    }

    thead {
        display: table-header-group;
    }

    tr,
    td,
    th {
        page-break-inside: avoid;
    }
}
